package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.LanguageKey;
import com.ruoyi.system.domain.params.LanguageKeyParams;
import com.ruoyi.system.domain.vo.LanguageKeyVo;
import com.ruoyi.system.domain.vo.LanguageValueVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 语言键Mapper接口
 *
 * @author huyafang
 * @date 2023-03-06
 */
@Mapper
@Repository
public interface LanguageKeyMapper  {

    List<LanguageKeyVo> queryList(@Param("condition") LanguageKeyParams languageKeyParams);

    int updateById(@Param("item") LanguageKey languageKey,@Param("id") Long id);

    LanguageKey getByCode(String code);

    int deleteByCodes(String[] keys);

    int updateSort();

    /**
     * 批量添加语言键
     *
     * @param list     语言键集合
     * @param createBy 创建者
     * @return
     */
    int insertList(@Param("list") List<LanguageValueVo> list, @Param("createBy") String createBy);
}
